[mdadm PATCH] Fix small memory leak

Found by cppcheck

Signed-off-by: Thomas Jarosch <thomas.jarosch [at] intra2net.com>
---
config.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/config.c b/config.c
index ad75411..c0a6baa 100644
--- a/config.c
+++ b/config.c
[at] [at] -707,6 +707,8 [at] [at] void autoline(char *line)
for (i = 0; i < super_cnt; i++)
if (!seen[i])
policy_add(rule_policy, pol_auto, dflt, pol_metadata, superlist[i]->name, NULL);
+
+ free(seen);
}

int loaded = 0;
--
1.7.4.4

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Thomas Jarosch [ Fr, 26 August 2011 07:33 ] [ ID #2063630 ]

Re: [mdadm PATCH] Fix small memory leak

On Fri, 26 Aug 2011 07:33:37 +0200 Thomas Jarosch
<thomas.jarosch [at] intra2net.com> wrote:

> Found by cppcheck
>
> Signed-off-by: Thomas Jarosch <thomas.jarosch [at] intra2net.com>
> ---
> config.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/config.c b/config.c
> index ad75411..c0a6baa 100644
> --- a/config.c
> +++ b/config.c
> [at] [at] -707,6 +707,8 [at] [at] void autoline(char *line)
> for (i = 0; i < super_cnt; i++)
> if (!seen[i])
> policy_add(rule_policy, pol_auto, dflt, pol_metadata, superlist[i]->name, NULL);
> +
> + free(seen);
> }
>
> int loaded = 0;


Applied, thanks.

NeilBrown
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
NeilBrown [ Mi, 07 September 2011 10:11 ] [ ID #2064039 ]
Linux » gmane.linux.raid » [mdadm PATCH] Fix small memory leak

Vorheriges Thema: [PATCH] kill-subarray: fix, cannot kill-subarray with unsupportedmetadata
Nächstes Thema: [PATCH] Fix: Sometimes mdmon throws core dump during reshape